<!doctype html>
<html xmlns:th="www.thymeleaf.org">
<meta charset="utf-8">
<head th:replace="index::head"></HEAD>
<BODY>
	<header th:replace="index::#ph"></header>
	<!--      主体        -->
	<main>
		<!--      导航        -->
		<div style="padding: 3px 8px">
			<span class="layui-breadcrumb">
				<a href="/">作业论坛首页</a>
				<a>
					<cite>{{course.name}}</cite>
				</a>
			</span>
			<div style="text-align: right; float: right;">
				<btn th:if="${session?.loginedUser?.role}==0" :url="'to_task-edit?cid='+param()" cls="layui-btn-xs">添加作业</btn>
			</div>
		</div>
		<!--      新帖        -->
		<DIV class="t">
			<TABLE cellSpacing="0" cellPadding="0" width="100%">
				<!--       表 头           -->
				<TR class="tr2">
					<TD style="width: 25px">&nbsp;</TD>
					<TD style="width: 33%" align="center">作业</TD>
					<TD style="width: 33%" align="center">最新回复</TD>
					<TD style="width: 5%" align="center">提交数</TD>
					<TD style="width: 5%" align="center">回复数</TD>
					<TD style="width: 10%" align="center">发布者</TD>
					<TD style="width: 10%" align="center">发布时间</TD>
				</TR>
				<!--         主 题 列 表        -->
				<TR class="tr3" v-for="o in page.content">
					<TD style="text-align:center">
						<a th:if="${session?.loginedUser?.role}==0" :href="'to_task-edit?id='+o.id"><IMG src="image/topic.gif" border=0></a>
						<IMG th:if="${session?.loginedUser?.role}!=0" src="image/topic.gif" border=0>
					</TD>
					<TD>
						<A :href="'to_detail?id='+o.id">{{o.clsSn}}班：{{o.name}}</A>
					</TD>
					<TD class="rowcontent">
						<IMG v-if="o.data.content" :src="o.data.head" height="26px">
						<A v-if="o.data.content" :href="'to_detail?id='+o.data.task_id">
							<span>{{o.data.name}}：</span><span v-html="charImg(o.data.content,20)"></span>
						</A>
					</TD>
					<TD class="center"><a :href="replace('to_tasklogs?id=[1]&clsSn=[2]',o.id,o.clsSn)">{{o.data.commit_cnt}}</a></TD>
					<TD class="center"><a :href="replace('to_tasklogs?id=[1]&clsSn=[2]',o.id,o.clsSn)">{{o.data.comment_cnt}}</a></TD>
					<TD class="center">{{nvl(o,'inUser.name')}}</TD>
					<TD class="center">{{castDateFormat(o.inTime,"MM月dd号")}}</TD>
				</TR>
			</TABLE>
		</DIV>
		<!--            翻 页          -->
		<page :url="'hwctask/task/find?order=id!&course.id=' + param()" data="page"
			  :join="'list/TaskSum?cid=' + param()" on="id=task_id"></page>
		<load :url="'hwctask/course/get?id=' + param()" data="course"></load>
	</main>
	<script type="text/javascript">
		vue("main", "page", "course");
		layui.element.render();
	</script>
	<!-- 导入页脚 -->
	<footer th:replace="index::footer"></footer>
</BODY>
</HTML>
